package com.ktjy.thymeleaf.controller;

import com.ktjy.thymeleaf.entity.User;
import com.ktjy.thymeleaf.service.IUserService;
import jakarta.annotation.Resource;
import net.sf.jsqlparser.Model;

public class ExampleController {
    @Resource
    private IUserService userService;
    @GetMapping(value = "/hello/{id}")
    public String getUser(@PathVariable("id") Long usrId, Model model){
        User user = userService.getUser(usrId);
        model.addAttribute("user",user);
        return "demo/hello";
    }
}
